<html><?php
echo '<?xml version="1.0" encoding="UTF-8" />';
echo $this->doctype();
?>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<?php 
	echo $this->headTitle();
	$config = Zend_Registry::get('config');
	$this->headLink()->appendStylesheet($config->baseurl.'/css/reset.css');
	$this->headLink()->appendStylesheet($config->baseurl.'/css/view.css');
	$this->headLink()->appendStylesheet($config->baseurl.'/res/css/'.$this->themeCSS);
	$this->headScript()->appendFile($config->baseurl.'/js/jquery-1.4.2.min.js');
	$this->headScript()->appendFile($config->baseurl.'/js/view.js');
	echo $this->headLink();
	?>
</head>

<body>
<div id="baseUrl"><?php echo $config->baseurl; ?></div>
<div id="header"></div>

<div id="contentwrap">
<div id="topmargin"></div>
<div id="contenttleft"></div>
<div id="contenttop"></div>
<div id="contenttright"></div>
<div id="content">
<div id="contentinner">
<?php 
if ($this->permission != 5) {
	if ($this->permission == 0) {
		echo 'Not allowed to view this invitation';
	} else {
?> 
<div id="mainColumn">
<div id="posterWrap" class="infoBox">
<div id="posterFrame">
<div id="poster">
<div id="posterTitle"><?php echo $this->invitation->title;?></div>
<div id="posterDescription"><?php echo $this->invitation->description;?></div>
<div id="posterTime"><strong>时间</strong> <?php echo $this->invitation->date;?></div>
<div id="posterPlace"><strong>地点</strong> <?php echo $this->invitation->address;?></div>
</div>
</div>
</div>
<!--<div class="infoBox" id="posterInfo">
<ul>
<li><strong>附加信息</strong> 大家随便带点什么来啊 哈哈哈哈 人多好玩！！要玩杀人！！！</li>
</ul>
</div>

--><?php
// only show comment when permission is 1 or 3
if ($this->permission == 1 || $this->permission ==3) {	
?>
<div class="infoBoxTitle">
<div class="infoBoxTitleInner" id="liuyanban">您有什么想说的吗？</div>
<div id="invitationMessageFormFrame"><?php
echo $this->invitationMessageForm;
?></div></div>
<div class="infoBox withTitle" id="commentArea">

<?php echo $this->invitationComment($this->invitedUser->id, $this->invitation->id, $this->loggedInUser());?>

</div>
<?php 
}
?>

</div>

<div id="siteColumn">

<?php
// only show comment when permission is 1 or 3
if ($this->permission == 1 || $this->permission ==3) {
	echo $this->invitationAttend($this->invitation,$this->invitedUser);
} else if ($this->permission == 2 || $this->permission == 4) {
	echo '<h1>Request to join this invitation</h1>';
	echo $this->approvalForm;
	echo $this->message;
}
	} // end if permission == 0
} else {
	echo 'Wrong url';
}// end if permission == 5
?>

<!--<p>
 注册邀请卡用户: <a href="/user/register?uid=<?php echo $this->invited_user_id;?>">注册</a>
</p>-->
</div>

</div>


<div id="footer">
<a id="logo" title="微茗阁" href="<?php echo $this->url(array('controller'=>'index','action'=>'index'));?>">微茗阁</a>
<div id="copyright"><a>版权声明</a> -
<a>联系我们</a> - © 2010 weimingge.com, All Rights Reserved

</div>
</div>


</div>


<div id="contentbleft"></div>
<div id="contentbottom"></div>
<div id="contentbright"></div>

</div>


</body>
<?php echo $this->headScript(); ?>
</html>